package com.sect.edu.info.manager.dao;

import com.sect.edu.info.manager.domain.Student;

import java.util.ArrayList;

/**
 * @author げっしょく
 * @date 2021/7/17
 */
public class StudentDao {
    static Student[] stus = new Student[5];
    static ArrayList<Student> list = new ArrayList<>();
    public boolean addStudent(Student stu){
        //返回集合list 的添加结果为true则添加成功
        return list.add(stu);
    }
    public ArrayList<Student> findAllStudent() {
        return list;
    }
}


/*    public boolean addStudent(Student stu) {
        int index = 0;
        for (int i = 0; i < stus.length; i++) {
            Student stu1 = stus[i];
            if(stu1 == null){
                stus[i] = stu;
                return true;
            }
        }
        return false;
    }

    public Student[] findAllStudent() {
        return stus;
    }*/
